package com.ruoyi.project.channel.channelAccountAmount.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.channel.channelAccountAmount.mapper.ChannelAccountAmountMapper;
import com.ruoyi.project.channel.channelAccountAmount.domain.ChannelAccountAmount;
import com.ruoyi.project.channel.channelAccountAmount.service.IChannelAccountAmountService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 个码预充值 服务层实现
 * 
 * @author CAIN
 * @date 2019-09-06
 */
@Service
public class ChannelAccountAmountServiceImpl implements IChannelAccountAmountService 
{
	@Autowired
	private ChannelAccountAmountMapper channelAccountAmountMapper;

	/**
     * 查询个码预充值信息
     * 
     * @param accountCashId 个码预充值ID
     * @return 个码预充值信息
     */
    @Override
	public ChannelAccountAmount selectChannelAccountAmountById(Long accountCashId)
	{
	    return channelAccountAmountMapper.selectChannelAccountAmountById(accountCashId);
	}
	/**
	 * 查询个码预充值信息
	 *
	 * @param account 账号
	 * @return 个码预充值信息
	 */
	public ChannelAccountAmount selectAccountAmountSum(String account){
		return channelAccountAmountMapper.selectAccountAmountSum(account);
	}
	/**
     * 查询个码预充值列表
     * 
     * @param channelAccountAmount 个码预充值信息
     * @return 个码预充值集合
     */
	@Override
	public List<ChannelAccountAmount> selectChannelAccountAmountList(ChannelAccountAmount channelAccountAmount)
	{
	    return channelAccountAmountMapper.selectChannelAccountAmountList(channelAccountAmount);
	}
	
    /**
     * 新增个码预充值
     * 
     * @param channelAccountAmount 个码预充值信息
     * @return 结果
     */
	@Override
	public int insertChannelAccountAmount(ChannelAccountAmount channelAccountAmount)
	{
	    return channelAccountAmountMapper.insertChannelAccountAmount(channelAccountAmount);
	}
	
	/**
     * 修改个码预充值
     * 
     * @param channelAccountAmount 个码预充值信息
     * @return 结果
     */
	@Override
	public int updateChannelAccountAmount(ChannelAccountAmount channelAccountAmount)
	{
	    return channelAccountAmountMapper.updateChannelAccountAmount(channelAccountAmount);
	}

	/**
     * 删除个码预充值对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteChannelAccountAmountByIds(String ids)
	{
		return channelAccountAmountMapper.deleteChannelAccountAmountByIds(Convert.toStrArray(ids));
	}
	
}
